checkout: Fix previous commit
authorColin Walters <walters@verbum.org>
Wed, 11 Sep 2013 15:54:53 +0000 (11:54 -0400)
committerColin Walters <walters@verbum.org>
Wed, 11 Sep 2013 15:54:53 +0000 (11:54 -0400)
Don't try to close in cases where we don't have input.

src/libostree/ostree-repo-checkout.c

index 437e309960dd9e496cdb54bef3aecca432bad937..13add0479a656066fc725368aed2dcdfa0fa2041 100644 (file)
@@ -503,8 +503,11 @@ checkout_one_file_at (OstreeRepo                        *repo,
             }
         }
 
-      if (!g_input_stream_close (input, cancellable, error))
-        goto out;
+      if (input)
+        {
+          if (!g_input_stream_close (input, cancellable, error))
+            goto out;
+        }
     }
 
   ret = TRUE;